﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace 计科201518彭康
{
    public partial class 实验2_1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            TextBox3.Text = TextBox1.Text + Environment.NewLine + TextBox2.Text + Environment.NewLine;


            for (int i = 0; i < RadioButtonList1.Items.Count; i++)
            {
                if (RadioButtonList1.Items[i].Selected)
                {
                    TextBox3.Text = TextBox3.Text + RadioButtonList1.Items[i].Value + Environment.NewLine;

                }
            }

            if (CheckBox1.Checked)
            { TextBox3.Text = TextBox3.Text + "是" + Environment.NewLine; }
            else { TextBox3.Text = TextBox3.Text + "否" + Environment.NewLine; }

            for (int i = 0; i < DropDownList1.Items.Count; i++)
            {
                if (DropDownList1.Items[i].Selected)
                {
                    TextBox3.Text = TextBox3.Text + DropDownList1.Items[i].Value + Environment.NewLine;

                }
            }

            for (int i = 0; i < CheckBoxList1.Items.Count; i++)
            {
                if (CheckBoxList1.Items[i].Selected)
                {
                    TextBox3.Text = TextBox3.Text + CheckBoxList1.Items[i].Value + Environment.NewLine;

                }
            }

            for (int i = 0; i < RadioButtonList2.Items.Count; i++)
            {
                if (RadioButtonList2.Items[i].Selected)
                {
                    TextBox3.Text = TextBox3.Text + RadioButtonList2.Items[i].Value + Environment.NewLine;

                }
            }

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Redirect(Request.Url.ToString());
        }

        protected void Button3_Click(object sender, EventArgs e)
        {

        }
    }
}